<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<style>
    #content{
        background-color: white;
        padding: 8px;
    }
</style>
<div align="center">
<div class="span-8">
<?php
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id' => 'pelajar-profile_update-form',
//    'type' => 'horizontal',
    'htmlOptions' => array('enctype' => 'multipart/form-data'),
    'enableAjaxValidation' => TRUE,
        ));
?>
<?php 
if(file_exists($model->image)){
    $img = Yii::app()->request->baseUrl.'/'.$model->image;
}else{
    $img = Yii::app()->request->baseUrl.'/images/asset/no_user.jpg';
} 
print CHtml::image($img,'student',array(
    'width'=>200,
));
?>
<?php echo $form->fileFieldRow($model, 'image');  ?>

<div class="form-actions" whidt>
    <?php   
    $this->widget('bootstrap.widgets.TbButton', array(
        'buttonType' => 'submit',
        'type' => 'primary',
        'label' => 'Rubah',
    ));
    ?>
</div>

<?php $this->endWidget(); ?>
</div>
</div>
